home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #9 / Amiga Plus CD - 2004 - No. 09.iso / amigaplus / tools / dev_libs / feelin040718 / include / libraries / feelin.e next >
Text File  |  2004-08-03  |  39KB  |  1,154 lines

  1. OPT MODULE
  2. OPT EXPORT,PREPROCESS
  3.  
  4. /*
  5. **    $VER: feelin.e 7.0 (2004/07/18)
  6. **
  7. **    feelin.library definitions
  8. **
  9. **    © 2000-2004 Olivier LAVIALE (gofromiel@numericable.fr)
  10. */
  11.  
  12. MODULE 'exec/semaphores','exec/libraries','exec/ports',
  13.        'graphics/rastport','graphics/text',
  14.        'intuition/intuition'
  15.  
  16. ->PROC Module information
  17. /*
  18.    All constants follow these rules :
  19.  
  20.    FM_<method>          - General method, understood by all classes [NUM]
  21.    FM_<class>_<method>  - Class method                              [NUM,STR]
  22.    FA_<attrib>          - General attribute, known by many classes. [NUM]
  23.    FA_<class>_<attrib>  - Specific class attribute                  [NUM,STR]
  24.    FV_<class>_<value>   - Special attribute value                   [NUM]
  25.    FS_<name>            - Structure of arguments to a method
  26.    FP_<class>_<value>   - Preference, resolved on FM_Setup          [STR]
  27.  
  28.    FA_<attrib> definitions are followed by a comment [ISG] :
  29.       I : it's possible to specify this attribute at object creation time.
  30.       S : it's possible to change this attribute with F_Set().
  31.       G : it's possible to get this attribute with F_Get().
  32.  
  33.    FR_<class> = Registered class id (unsigned 24 bits)
  34.    FR_<class>_Mthd = First Method ID of <class>
  35.    FR_<class>_Attr = First Attribute ID of <class>
  36.  
  37.    Ranges:
  38.  
  39.    $F0000000 - $FFFFFFFF is reserved for Feelin methods.
  40.    $8F000000 - $8FFFFFFF is reserved for Feelin attributes.
  41.  
  42.    $C0000000 - $CFFFFFFF is reserved for custom classes methods.
  43.    $8C000000 - $8CFFFFFF is reserved for custom classes attributes.
  44.  
  45.    $4D000000 - 4DFFFFFFF is reserved for Dynamic methods.
  46.    $41000000 - 41FFFFFFF is reserved for Dynamic attributes.
  47.  
  48.    Since v6 of feelin.library most classes use dynamic IDs instead of static
  49.    ones.  Dynamic  IDs  are  generated on the fly at run time, thus they are
  50.    different at each session and future proof. You should  have  a  look  at
  51.    Feelin_DEV.guide to learn more about this.
  52.  
  53. */
  54.  
  55. CONST    FV_VERSION = 6
  56.  
  57. CONST    MTHD_BASE = $F0000000,
  58.          ATTR_BASE = $8F000000,
  59.  
  60.          FCCM_BASE = $C0000000,
  61.          FCCA_BASE = $8C000000,
  62.  
  63.          DYNA_MTHD = $4D000000,
  64.          DYNA_ATTR = $41000000
  65. ->ENDPROC
  66.  
  67. /*** Misc ******************************************************************/
  68.  
  69. ->PROC Basic structures
  70. OBJECT feelinNode
  71.    next:PTR TO feelinNode
  72.    prev:PTR TO feelinNode
  73. ENDOBJECT
  74.  
  75. OBJECT feelinNodePri OF feelinNode
  76.    priority:CHAR
  77.    reserved1:CHAR
  78. ENDOBJECT
  79.  
  80. OBJECT feelinNodeNamed OF feelinNodePri
  81.    reserved2:INT
  82.    name:PTR TO CHAR
  83. ENDOBJECT
  84.  
  85. OBJECT feelinList
  86.    head:PTR TO feelinNode
  87.    tail:PTR TO feelinNode
  88. ENDOBJECT
  89.  
  90. OBJECT feelinListSemaphored OF feelinList
  91.    semaphore:ss
  92. ENDOBJECT
  93.  
  94. OBJECT feelinNodeData OF feelinNode
  95.    data
  96. ENDOBJECT
  97. ->ENDPROC
  98. ->PROC SYSTEM
  99. OBJECT feelinMethodEntry
  100.    method
  101.    name:PTR TO CHAR
  102.    id:LONG
  103. ENDOBJECT
  104.  
  105. OBJECT feelinDynamicEntry
  106.    name:PTR TO CHAR
  107.    id:LONG
  108. ENDOBJECT
  109.  
  110. /* SYSTEM PUBLIC */
  111.  
  112. OBJECT feelinbase OF lib
  113.    console
  114.    putchar
  115.  
  116.    sys:PTR TO lib
  117.    dos:PTR TO lib
  118.    graphics:PTR TO lib
  119.    intuition:PTR TO lib
  120.    utility:PTR TO lib
  121.    layers:PTR TO lib
  122.    locale:PTR TO lib
  123. /* end of public data */
  124. ENDOBJECT
  125. ->ENDPROC
  126. ->PROC Macros:
  127. ->PROC Macros / Classes
  128. ->ENDPROC
  129. ->PROC Macros / Objects
  130. #define _next(o)        o::feelinNotify.next
  131. #define _prev(o)        o::feelinNotify.prev
  132.  
  133. /* only for subclasses of FC_Area */
  134.  
  135. ->ENDPROC
  136. ->PROC Macros / Drawing
  137. #define _FPen(o,fp)        SetAPen(rp,_pen(o,fp))
  138. #define _APen(p)           SetAPen(rp,p)
  139. #define _BPen(p)           SetBPen(rp,p)
  140. #define _DrMd(m)           SetDrMd(rp,m)
  141. #define _Plot(x1,y1)       WritePixel(rp,x1,y1)
  142. #define _Move(x,y)         Move(rp,x,y)
  143. #define _Draw(x,y)         Draw(rp,x,y)
  144. #define _Boxf(x1,y1,x2,y2) RectFill(rp,x1,y1,x2,y2)
  145. #define _Text(s,c)         Text(rp,s,c)
  146. ->ENDPROC
  147. ->PROC Macros / E library patch (Fe_Xxx -> F_Xxx)
  148. #define F_CreatePool    Fe_CreatePool
  149. #define F_DeletePool    Fe_DeletePool
  150. #define F_New           Fe_New
  151. #define F_NewP          Fe_NewP
  152. #define F_Dispose       Fe_Dispose
  153. #define F_DisposeP      Fe_DisposeP
  154. #define F_OPool         Fe_OPool
  155. #define F_SPool         Fe_SPool
  156. #define F_RPool         Fe_RPool
  157. #define F_NamePool      Fe_NamePool
  158.  
  159. #define F_LinkTail      Fe_LinkTail
  160. #define F_LinkHead      Fe_LinkHead
  161. #define F_LinkInsert    Fe_LinkInsert
  162. #define F_LinkRemove    Fe_LinkRemove
  163. #define F_LinkMember    Fe_LinkMember
  164. #define F_NextNode      Fe_NextNode
  165. #define F_StrCmp        Fe_StrCmp
  166.  
  167. #define F_FindClass     Fe_FindClass
  168. #define F_OpenClass     Fe_OpenClass
  169. #define F_CloseClass    Fe_CloseClass
  170. #define F_CreateClassA  Fe_CreateClassA
  171. #define F_DeleteClass   Fe_DeleteClass
  172.  
  173. #define F_DoA           Fe_DoA
  174. #define F_ClassDoA      Fe_ClassDoA
  175. #define F_SuperDoA      Fe_SuperDoA
  176.  
  177. #define F_NewObjA       Fe_NewObjA
  178. #define F_MakeObjA      Fe_MakeObjA
  179. #define F_DisposeObj    Fe_DisposeObj
  180.  
  181. #define F_Set              Fe_Set
  182. #define F_Get              Fe_Get
  183. #define F_Draw             Fe_Draw
  184. #define F_DrawBackground   Fe_DrawBackground
  185. #define F_AskMinMax        Fe_AskMinMax
  186. #define F_Layout           Fe_Layout
  187. #define F_ModifyHandler    Fe_ModifyHandler
  188.  
  189. #define F_AlertA              Fe_AlertA
  190. #define F_DebugOutA           Fe_DebugOutA
  191.  
  192. #define F_OpenServer          Fe_OpenServer
  193. #define F_CloseServer         Fe_CloseServer
  194. #define F_CreateServerA       Fe_CreateServerA
  195. #define F_DeleteServer        Fe_DeleteServer
  196. #define F_SendServerMessageA  Fe_SendServerMessageA
  197.  
  198. #define F_DynamicFindID          Fe_DynamicFindID
  199. #define F_DynamicResolveTable    Fe_DynamicResolveTable
  200. #define F_DynamicNTI             Fe_DynamicNTI
  201. #define F_DynamicFTI             Fe_DynamicFTI
  202. #define F_DynamicGTD             Fe_DynamicGTD
  203. ->ENDPROC
  204. ->PROC Macros / Object Generation
  205. ENUM  FV_MakeObj_Label = 1,                       -> label:PTR TO CHAR, flags:LONG
  206.       FV_MakeObj_Button,                          -> label:PTR TO CHAR
  207.       FV_MakeObj_Bar,                             -> Horiz:BOOL
  208.       FV_MakeObj_BarTitle,                        -> label:PTR TO CHAR
  209.       FV_MakeObj_Gauge,                           -> Horiz:BOOL,LONG Min, LONG Max, LONG Value
  210.       FV_MakeObj_Slider,                          -> Horiz:BOOL,LONG Min, LONG Max, LONG Value
  211.       FV_MakeObj_Prop,                            -> Horiz:BOOL,LONG entries, LONG visible, LONG first
  212.       FV_MakeObj_String,                          -> label:PTR TO CHAR,maxlen:LONG
  213.       FV_MakeObj_Balance
  214.  
  215. #define SimpleButton(l)       F_MakeObjA(FV_MakeObj_Button, [l])
  216. #define Bar                   F_MakeObjA(FV_MakeObj_Bar,NIL)
  217. #define BarTitle(t)           F_MakeObjA(FV_MakeObj_BarTitle,[t])
  218. #define Gauge(h,mi,ma,v)      F_MakeObjA(FV_MakeObj_Gauge,[h,mi,ma,v])
  219. #define Slider(h,mi,ma,v)     F_MakeObjA(FV_MakeObj_Slider,[h,mi,ma,v,TAG_DONE])
  220. #define SliderA(h,mi,ma,v)    F_MakeObjA(FV_MakeObj_Slider,[h,mi,ma,v
  221. #define Prop(h,e,v,f)         F_MakeObjA(FV_MakeObj_Prop,[h,e,v,f])
  222. #define String_(s,l)          F_MakeObjA(FV_MakeObj_String,[s,l])
  223.  
  224. #define Child           FA_Child
  225. #define End             NIL])
  226.  
  227. #define FO_Button    F_NewObjA(FC_Text,[ \
  228.                                FA_Frame,           'FP_Frame_Button',        \
  229.                                FA_Back,            'FP_Back_Button',         \
  230.                                FA_AltBack,         'FP_Back_ButtonAlt',      \
  231.                                FA_FixedHeight,     TRUE,                   \
  232.                                FA_InputMode,       FV_InputMode_Release,   \
  233.                                FA_Font,            'FP_Font_Button'
  234.                              /*
  235.                                FA_Text_PreParse,
  236.                                FA_Text
  237.                              */
  238.  
  239. #define FO_String    F_NewObjA(FC_String,[                                 \
  240.                                FA_Frame,           'FP_Frame_String',        \
  241.                                FA_Back,            'FP_Back_String',         \
  242.                                FA_AltBack,         'FP_Back_StringAlt',      \
  243.                                FA_Font,            'FP_Font_String',         \
  244.                                FA_FixedHeight,     TRUE
  245.                              /*
  246.                                FA_String,
  247.                                FA_String_MaxLen
  248.                              */
  249. ->ENDPROC
  250. ->PROC Macros / ASM
  251. #define SaveSP(x) MOVE.L   x,-(A7)
  252. #define LoadSP(x) MOVE.L   (A7)+,x
  253. ->ENDPROC
  254. ->ENDPROC :Macros
  255.  
  256. /*** Low-level Objects *****************************************************/
  257.  
  258. ->PROC FC_Object                          $000000
  259. #define FC_Object 'Object'
  260. #define FObject                                 LONG
  261.  
  262. CONST FR_Object            = $000000
  263. CONST FR_Object_MTHD       = MTHD_BASE OR FR_Object,
  264.       FR_Object_ATTR       = ATTR_BASE OR FR_Object
  265.  
  266. ENUM  FM_New                                  = FR_Object_MTHD,
  267.       FM_Dispose,
  268.       FM_Get,
  269.       FM_Set,
  270.       FM_Notify,
  271.       FM_UnNotify,
  272.       FM_CallHook,
  273.       FM_CallHookEntry,
  274.       FM_WriteLong,
  275.       FM_WriteString,
  276.       FM_MultiSet,
  277.       FM_SetAsString,
  278.       FM_Export,
  279.       FM_Import,
  280.       FM_Connect,
  281.       FM_Disconnect,
  282.       FM_AddMember,
  283.       FM_RemMember
  284.  
  285. ENUM  FA_Class                                  = FR_Object_ATTR,
  286.       FA_Revision,
  287.       FA_Version,
  288.       FA_ID,
  289.       FA_UserData,
  290.       FA_NoNotify,
  291.       FA_Parent,
  292.       FA_Child,
  293.       FA_ContextHelp,
  294.       FA_ContextMenu
  295.  
  296. ENUM  FV_Notify_None,
  297.       FV_Notify_Self,
  298.       FV_Notify_Parent,
  299.       FV_Notify_Window
  300. CONST FV_Notify_Always                          = $49893131,
  301.       FV_Notify_Toggle                          = $49893132,
  302.       FV_Notify_Value                           = $49893131
  303.  
  304. ENUM  FV_AddMember_Head = -1,
  305.       FV_AddMember_Tail,
  306.       FV_AddMember_Insert
  307.  
  308. #define _class(o)                               (Long(o-4))
  309. #define _classname(o)                           (_class(o)::feelinClass.name)
  310. ->ENDPROC
  311. ->PROC FC_Class                           $000040
  312. #define FC_Class 'Class'
  313.  
  314. CONST FR_Class             = $000040
  315. CONST FR_Class_MTHD        = MTHD_BASE OR FR_Class,
  316.       FR_Class_ATTR        = ATTR_BASE OR FR_Class
  317.  
  318. ENUM  FA_Class_Name                           = FR_Class_ATTR,
  319.       FA_Class_SuperName,
  320.       FA_Class_LODSize,
  321.       FA_Class_Dispatcher,
  322.       FA_Class_Init,
  323.       FA_Class_Exit,
  324.       FA_Class_UserData,
  325.       FA_Class_Pool,
  326.       FA_Class_Methods,
  327.       FA_Class_Attributes,
  328.       FA_Class_ResolveTable,
  329.       FA_Class_MethodsTable,
  330.       FA_Class_AutoReolveTable
  331.  
  332. OBJECT feelinClass OF feelinNode
  333. ->   private0
  334.    name:PTR TO CHAR
  335. ->   private1
  336.    offset:INT
  337.    lodsize:INT
  338.    userdata
  339.    usercount:LONG
  340.  
  341.    super:PTR TO feelinClass
  342.    methods:PTR TO feelinDynamicEntry         -> see FA_Class_Methods
  343.    attributes:PTR TO feelinDynamicEntry      -> see FA_Class_Attributes
  344.    resolvedids:PTR TO feelinDynamicEntry     -> see FA_Class_ResolveTable
  345.    autoresolvedids:PTR TO feelinDynamicEntry -> see FA_Class_AutioResolveTable
  346. ENDOBJECT
  347.  
  348. #define F_QUERY                  PROC FCC_Query(feelin=A0:PTR TO feelinbase)
  349. #define F_INIT                   PROC FCC_Init(class=A2:PTR TO feelinClass)
  350. #define F_EXIT                   PROC FCC_Exit(class=A2:PTR TO feelinClass)
  351. #define F_METHOD(name)           PROC name(class=A2:PTR TO feelinClass,obj=A0,method=D0,msg=A1)
  352. #define F_METHODM(name,fs)       PROC name(class=A2:PTR TO feelinClass,obj=A0,method=D0,msg=A1:PTR TO fs)
  353. #define F_HOOK(name)             PROC name(hook=A0:PTR TO hook,obj=A2,msg=A1)
  354. #define F_HOOKM(name,fs)         PROC name(hook=A0:PTR TO hook,obj=A2,msg=A1:PTR TO fs)
  355. #define F_SUPERDO                F_SuperDoA(class,obj,method,msg)
  356. #define F_OBJDO(o)               F_DoA(o,method,msg)
  357. #define F_STORE(val)             item.data = val
  358. #define F_LOD(cl,o)              o + cl::feelinClass.offset
  359. #define F_ID(tab,n)              (tab[n].id)
  360. #define F_IDM(n)                 F_ID(class.methods,n)
  361. #define F_IDA(n)                 F_ID(class.attributes,n)
  362. #define F_IDR(n)                 F_ID(class.resolvedids,n)
  363. #define F_IDO(n)                 F_ID(class.autoresolvedids,n)
  364. #define F_PEN(o)                 (Long(o+8))
  365. ->ENDPROC
  366. ->PROC FC_Semaphore                       $000080
  367. #define FC_Semaphore                            'Semaphore'
  368.  
  369. CONST FR_Semaphore                              = $000080
  370. CONST FR_Semaphore_MTHD                         = MTHD_BASE OR FR_Semaphore,
  371.       FR_Semaphore_ATTR                         = ATTR_BASE OR FR_Semaphore
  372.  
  373. ENUM  FM_Semaphore_Lock                         = FR_Semaphore_MTHD,
  374.       FM_Semaphore_Unlock
  375.  
  376. ENUM  FA_Semaphore_Name                         = FR_Semaphore_ATTR,
  377.       FA_Semaphore_Public
  378.  
  379. CONST FF_Semaphore_Shared                       = 1 << 0,
  380.       FF_Semaphore_Attempt                      = 1 << 1
  381. ->ENDPROC
  382. ->PROC FC_Server                          $0000C0
  383. #define FC_Server                                "Server"
  384.  
  385. CONST FR_Server                                 = $0000C0
  386. CONST FR_Server_MTHD                            = MTHD_BASE OR FR_Server,
  387.       FR_Server_ATTR                            = ATTR_BASE OR FR_Server
  388.  
  389. ENUM  FM_Server_Find                            = FR_Server_MTHD,
  390.       FM_Server_Open,
  391.       FM_Server_Close,
  392.       FM_Server_Create,
  393.       FM_Server_Delete,
  394.       FM_Server_Shutdown
  395.  
  396. ENUM  FA_Server_Port                            = FR_Server_ATTR,
  397.       FA_Server_Entry,
  398.       FA_Server_StackSize,
  399.       FA_Server_Priority
  400. CONST FA_Server_Name                            = FA_Semaphore_Name
  401.  
  402. OBJECT feelinServerMessage
  403.    mn_Node:mn
  404.    mn_ReplyPort:PTR TO mp
  405.    mn_Length:INT
  406. /* end of Message Header */
  407.    pad0:INT
  408.    action:LONG
  409.    args:PTR TO LONG
  410.    return:LONG
  411. ENDOBJECT
  412. ->ENDPROC
  413.  
  414. /*** Support ***************************************************************/
  415.  
  416. ->PROC FC_Render                          $900000
  417.  
  418. CONST FR_Render                                 = $900000
  419. CONST FR_Render_MTHD                            = MTHD_BASE OR FR_Render,
  420.       FR_Render_ATTR                            = ATTR_BASE OR FR_Render
  421. #define FC_Render                               'Render'
  422.  
  423. CONST FA_Render_Application                     = FR_Render_ATTR +  0,
  424.       FA_Render_Display                         = FR_Render_ATTR +  1,
  425.       FA_Render_Window                          = FR_Render_ATTR +  2,
  426.       FA_Render_RPort                           = FR_Render_ATTR +  3,
  427.       FA_Render_Palette                         = FR_Render_ATTR +  4,
  428.       FA_Render_Friend                          = FR_Render_ATTR +  5
  429.  
  430. CONST FM_Render_AddClip                         = FR_Render_MTHD +  0,
  431.       FM_Render_RemClip                         = FR_Render_MTHD +  1,
  432.       FM_Render_AddClipRegion                   = FR_Render_MTHD +  2
  433.  
  434. OBJECT feelinRender
  435.    application:FObject                        -> Valid between FM_Setup / FM_Cleanup
  436.    display:FObject                            -> Valid between FM_Setup / FM_Cleanup
  437.    window:FObject                             -> Valid between FM_Setup / FM_Cleanup
  438.    rport:PTR TO rastport                        -> Valid between FM_Show  / FM_Hide
  439.    palette:PTR TO feelinPalette                 -> Set at will
  440.    flags
  441. ENDOBJECT
  442.  
  443. CONST FF_Render_Refreshing                      = 1 <<  0,
  444.       FF_Render_Complex                         = 1 <<  1,
  445.       FF_Render_TrueColors                      = 1 << 30,
  446.       FF_Render_Forbid                          = 1 << 31
  447. ->ENDPROC
  448. ->PROC FC_Family                          $900040
  449. CONST FR_Family                                 = $900040
  450. CONST FR_Family_MTHD                            = MTHD_BASE OR FR_Family,
  451.       FR_Family_ATTR                            = ATTR_BASE OR FR_Family
  452.  
  453. ENUM  FA_Family                                 = FR_Family_ATTR,
  454.       FA_Family_Head,
  455.       FA_Family_Tail,
  456.       FA_Family_Owner
  457.  
  458. OBJECT feelinFamilyNode OF feelinNode
  459.    object:FObject
  460. ENDOBJECT
  461.  
  462. #define FC_Family         'Family'
  463. #define FamilyObject F_NewObjA(FC_Family,[TAG_IGNORE,NIL
  464. ->ENDPROC
  465. ->PROC FC_FrameDisplay                    $900080
  466. #define FC_FrameDisplay         'FrameDisplay'
  467. #define FS_FrameDisplay_Draw     feelins_FrameDisplay_Draw
  468. #define FrameDisplayObject       F_NewObjA(FC_Frame,[IGNORE,NIL
  469.  
  470. CONST FR_FrameDisplay                           = $900080
  471. CONST FR_FrameDisplay_MTHD                      = MTHD_BASE OR FR_FrameDisplay,
  472.       FR_FrameDisplay_ATTR                      = ATTR_BASE OR FR_FrameDisplay
  473.  
  474. ENUM  FM_FrameDisplay_Draw                      = FR_FrameDisplay_MTHD
  475.  
  476. ENUM  FA_Back                                   = FR_FrameDisplay_ATTR,
  477.       FA_Frame,
  478.       FA_Frame_Font,
  479.       FA_Frame_Title,
  480.       FA_Frame_PreParse,
  481.       FA_Frame_Position,
  482.       FA_Frame_AreaObject
  483.  
  484. CONST FV_Frame_None                 = 0,
  485.       FV_Frame_LastBuiltin          = 41
  486.  
  487. ENUM  FV_Frame_UpLeft,              -> FA_Frame_Position
  488.       FV_Frame_UpRight,
  489.       FV_Frame_UpCenter,
  490.       FV_Frame_DownLeft,
  491.       FV_Frame_DownRight,
  492.       FV_Frame_DownCenter
  493.  
  494. CONST FF_Frame_Fill                 = %0001,
  495.       FF_Frame_Select               = %0010
  496.  
  497. OBJECT feelinInner
  498.    l:CHAR
  499.    t:CHAR
  500.    r:CHAR
  501.    b:CHAR
  502. ENDOBJECT
  503.  
  504. OBJECT feelinFrameDisplay
  505.    border[2]:feelinInner
  506.    space[2]:feelinInner
  507.    id[2]:INT
  508. ENDOBJECT
  509.  
  510. OBJECT FS_FrameDisplay_Draw; rect:PTR TO feelinRect,render:PTR TO feelinRender,flags ;ENDOBJECT
  511.  
  512. #define NoFrame         FA_Frame,FV_Frame_None
  513. #define ButtonFrame     FA_Frame,'FP_Button_Frame'
  514. #define TextFrame       FA_Frame,'FP_Text_Frame'
  515. #define StringFrame     FA_Frame,'FP_String_Frame'
  516. #define PropFrame       FA_Frame,'FP_Prop_Frame'
  517. #define SliderFrame     FA_Frame,'FP_Slider_Frame'
  518. #define GaugeFrame      FA_Frame,'FP_Gauge_Frame'
  519. #define GroupFrame      FA_Frame,'FP_Group_Frame'
  520. ->ENDPROC
  521. ->PROC FC_ImageDisplay                    $9000C0
  522. CONST FR_ImageDisplay                           = $9000C0
  523. CONST FR_ImageDisplay_MTHD                      = MTHD_BASE OR FR_ImageDisplay,
  524.       FR_ImageDisplay_ATTR                      = ATTR_BASE OR FR_ImageDisplay
  525.  
  526. ENUM  FM_ImageDisplay_Setup                     = FR_ImageDisplay_MTHD,
  527.       FM_ImageDisplay_Cleanup,
  528.       FM_ImageDisplay_Draw,
  529.       FM_ImageDisplay_Size
  530.  
  531. ENUM  FA_ImageDisplay_Spec                      = FR_ImageDisplay_ATTR,
  532.       FA_ImageDisplay_State,
  533.       FA_ImageDisplay_Width,
  534.       FA_ImageDisplay_Height
  535.  
  536. ENUM  FI_None,
  537.       FI_Shine,               FI_HalfShine,              FI_Fill,             FI_HalfShadow,             FI_Shadow,           FI_HalfDark,            FI_Dark,             FI_Highlight,
  538.       FI_Shine_HalfShine,     FI_HalfShine_Fill,         FI_Fill_HalfShadow,  FI_HalfShadow_Shadow,      FI_Shadow_HalfDark,  FI_HalfDark_Dark,       FI_Dark_Highlight,
  539.       FI_Shine_Fill,          FI_HalfShine_HalfShadow,   FI_Fill_Shadow,      FI_HalfShadow_HalfDark,    FI_Shadow_Dark,      FI_HalfDark_Highlight,
  540.       FI_Shine_HalfShadow,    FI_HalfShine_Shadow,       FI_Fill_HalfDark,    FI_HalfShadow_Dark,        FI_Shadow_Highlight,
  541.       FI_Shine_Shadow,        FI_HalfShine_HalfDark,     FI_Fill_Dark,        FI_HalfShadow_Highlight,
  542.       FI_Shine_HalfDark,      FI_HalfShine_Dark,         FI_Fill_Highlight,
  543.       FI_Shine_Dark,          FI_HalfShine_Highlight,
  544.       FI_Shine_Highlight
  545.  
  546. CONST FF_ImageDisplay_Region                    = 1 << 0
  547.  
  548. OBJECT fs_ImageDisplay_Setup                   ; render:PTR TO feelinRender ; ENDOBJECT
  549. OBJECT fs_ImageDisplay_Cleanup                 ; render:PTR TO feelinRender ; ENDOBJECT
  550. OBJECT fs_ImageDisplay_Draw                    ; render:PTR TO feelinRender ; rect:PTR TO feelinRect ; flags:LONG ; ENDOBJECT
  551. OBJECT fs_ImageDisplay_Size                    ; width:LONG ; height:LONG ; flags:LONG ; ENDOBJECT
  552. OBJECT fs_ImageDisplay_HookDraw                ; render:PTR TO feelinRender ; rect:PTR TO feelinRect ; flags:LONG ; region:PTR TO feelinRect ; ENDOBJECT
  553.  
  554. #define FS_ImageDisplay_HookDraw                 fs_ImageDisplay_HookDraw
  555.  
  556. #define FC_ImageDisplay             'ImageDisplay'
  557. #define ImageDisplayObject          F_NewObjA(FC_ImageDisplay,[TAG_IGNORE,NIL
  558. ->ENDPROC
  559. ->PROC FC_TextDisplay                     $900100
  560. CONST FR_TextDisplay                            = $900100
  561. CONST FR_TextDisplay_MTHD                       = MTHD_BASE OR FR_TextDisplay,
  562.       FR_TextDisplay_ATTR                       = ATTR_BASE OR FR_TextDisplay
  563.  
  564. #define FC_TextDisplay                          "TextDisplay"
  565.  
  566. ENUM  FM_TextDisplay_Setup                      = FR_TextDisplay_MTHD,
  567.       FM_TextDisplay_Cleanup,
  568.       FM_TextDisplay_Draw
  569.  
  570. ENUM  FA_TextDisplay_Contents                   = FR_TextDisplay_ATTR,
  571.       FA_TextDisplay_PreParse,
  572.       FA_TextDisplay_Font,
  573.       FA_TextDisplay_Width,
  574.       FA_TextDisplay_Height,
  575.       FA_TextDisplay_Shortcut
  576.  
  577. ->ENDPROC
  578.  
  579. /*** GUI System ************************************************************/
  580.  
  581. ->PROC Application                        $004000
  582. CONST FR_Application                            = $004000
  583. CONST FR_Application_Mthd                       = MTHD_BASE OR FR_Application,
  584.       FR_Application_Attr                       = ATTR_BASE OR FR_Application
  585.  
  586. ENUM  FM_Application_Run           = FR_Application_Mthd,
  587.       FM_Application_Shutdown,
  588.       FM_Application_Sleep,
  589.       FM_Application_Awake,
  590.       FM_Application_PushMethod,
  591.       FM_Application_Setup,
  592.       FM_Application_Cleanup,
  593.       FM_Application_Load,
  594.       FM_Application_Save,
  595.       FM_Application_Resolve,
  596.       FM_Application_ResolveInt,
  597.       FM_Application_OpenFont,
  598.       FM_Application_AddSignalHandler,
  599.       FM_Application_RemSignalHandler,
  600.       FM_Application_CollectSignals,
  601.       FM_Application_OpenPrefs,
  602.       FM_Application_ClosePrefs
  603.  
  604. ENUM  FA_Application            = FR_Application_Attr,
  605.       FA_Application_Title,
  606.       FA_Application_Version,
  607.       FA_Application_Copyright,
  608.       FA_Application_Author,
  609.       FA_Application_Description,
  610.       FA_Application_Base,
  611.       FA_Application_Unique,
  612.       FA_Application_Signal,
  613.       FA_Application_UserSignals,
  614.       FA_Application_WindowPort,
  615.       FA_Application_BrokerPort,
  616.       FA_Application_BrokerHook,
  617.       FA_Application_BrokerPri,
  618.       FA_Application_Broker,
  619.       FA_Application_Display,
  620.       FA_Application_OBJSpace,
  621.       FA_Application_OBJPrefs,
  622.       FA_Application_Sleep
  623.  
  624. ENUM  FV_Application_ENV,
  625.       FV_Application_ENVARC,
  626.       FV_Application_BOTH
  627.  
  628. ENUM  FV_KEY_NONE,
  629.       FV_KEY_PRESS,
  630.       FV_KEY_RELEASE,
  631.       FV_KEY_UP,
  632.       FV_KEY_DOWN,
  633.       FV_KEY_STEPUP,
  634.       FV_KEY_STEPDOWN,
  635.       FV_KEY_TOP,
  636.       FV_KEY_BOTTOM,
  637.       FV_KEY_LEFT,
  638.       FV_KEY_RIGHT,
  639.       FV_KEY_STEPLEFT,
  640.       FV_KEY_STEPRIGHT,
  641.       FV_KEY_FIRST,
  642.       FV_KEY_LAST,
  643.       FV_KEY_CHARBACK,
  644.       FV_KEY_CHARDEL,
  645.       FV_KEY_WORDBACK,
  646.       FV_KEY_WORDDEL,
  647.       FV_KEY_LINEBACK,
  648.       FV_KEY_LINEDEL,
  649.       FV_KEY_NEXTOBJ,
  650.       FV_KEY_PREVOBJ,
  651.       FV_KEY_NOOBJ,
  652.       FV_KEY_CLOSEWINDOW,
  653.       FV_KEY_COUNT
  654.  
  655. #define FC_Application                          'Application'
  656. #define AppObject                               F_NewObjA(FC_Application,[TAG_IGNORE,NIL
  657. #define FS_Resolve                              fs_Application_Resolve
  658. #define FS_OpenFont                             fs_Application_OpenFont
  659.  
  660.  
  661. /*** FeelinSignalHandler ***/
  662.  
  663. OBJECT feelinSignalHandler OF feelinNode
  664.    flags
  665.    object:FObject
  666.    method
  667.  
  668. UNION [
  669.    [signals,reserved],
  670.    [secs, micros]
  671.       ]
  672. ENDOBJECT
  673.  
  674. CONST FF_SignalHandler_Timer = %0001
  675.  
  676. /*** FeelinEvent ***********************************************************/
  677.  
  678. OBJECT feelinEvent
  679.    imsg:PTR TO intuimessage
  680.    flags:LONG
  681.    class:LONG
  682.    code:INT
  683.    qualifier:INT
  684.    key:CHAR
  685.    decodedchar:CHAR
  686.    reserved:INT
  687.    mousex:INT
  688.    mousey:INT
  689.    seconds:LONG
  690.    micros:LONG
  691.    window
  692. ENDOBJECT
  693.  
  694. CONST FF_Event_KeyUp    = 1 << 0
  695. CONST FF_Event_Repeat   = 1 << 1
  696.  
  697. /***************************************************************************/
  698.  
  699. OBJECT fs_Application_Resolve ; id,default ; ENDOBJECT
  700. OBJECT fs_Application_OpenFont ; obj:FObject,spec:PTR TO CHAR ; ENDOBJECT
  701. ->ENDPROC
  702. ->PROC Window                             $004040
  703. #define FC_Window          'Window'
  704. #define WindowObject F_NewObjA(FC_Window,[TAG_IGNORE,NIL
  705.  
  706. CONST FR_Window      = $004040
  707. CONST FR_Window_Mthd = MTHD_BASE OR FR_Window,
  708.       FR_Window_Attr = ATTR_BASE OR FR_Window
  709.  
  710. ENUM  FM_Window_Setup = FR_Window_Mthd,
  711.       FM_Window_Cleanup,
  712.       FM_Window_Open,
  713.       FM_Window_Close,
  714.       FM_Window_ChainAdd,
  715.       FM_Window_ChainRem,
  716.       FM_Window_AddEventHandler,
  717.       FM_Window_RemEventHandler,
  718.       FM_Window_HandleEvent,
  719.       FM_Window_Layout,
  720.       FM_Window_Draw
  721.  
  722. ENUM  FA_Window               = FR_Window_Attr,
  723.       FA_Window_Title,
  724.       FA_Window_ScreenTitle,
  725.       FA_Window_Open,
  726.       FA_Window_CloseRequest,
  727.       FA_Window_Active,
  728.       FA_Window_ActiveObject,
  729.       FA_Window_Backdrop,
  730.       FA_Window_Borderless,
  731.       FA_Window_Resizable,
  732.       FA_Window_GadNone,
  733.       FA_Window_GadDragbar,
  734.       FA_Window_GadClose,
  735.       FA_Window_GadDepth,
  736.       FA_Window_GadIconify,
  737.       FA_Window_Decorator,
  738.  
  739.       FA_Window_HandlePopHelp
  740.  
  741. ENUM  FV_Window_ActiveObject_Prev = -2,
  742.       FV_Window_ActiveObject_Next,
  743.       FV_Window_ActiveObject_None
  744.  
  745. ENUM  FV_Window_Snapshot_Remember,
  746.       FV_Window_Snapshot_Save,
  747.       FV_Window_Snapshot_Forget
  748.  
  749. /*** EventHandler **********************************************************/
  750.  
  751. OBJECT feelinEventHandler OF feelinNode
  752.    flags:INT
  753.    priority:CHAR                 -> Linked by priority
  754.    reserved:CHAR
  755.    events                        -> One or more IDCMP flags this handler should react on
  756.    object:FObject              -> Object which should receive FM_HandleEvent
  757.    class:PTR TO feelinClass      -> If class <> NIL then class will be called instead of _class(object)
  758. ENDOBJECT
  759.  
  760. CONST FF_HandleEvent_Eat = %0001 -> Returned by FM_HandleEvent to stop event propagation
  761. ->ENDPROC
  762. ->PROC Display                            $004080
  763. CONST FR_Display      =                $004080
  764. CONST FR_Display_MTHD = MTHD_BASE OR FR_Display,
  765.       FR_Display_ATTR = ATTR_BASE OR FR_Display
  766.  
  767. ENUM  FM_AddColor                               = FR_Display_MTHD,
  768.       FM_RemColor,
  769.       FM_AddPalette,
  770.       FM_RemPalette,
  771.       FM_CreateColor,
  772.       FM_CreateColorScheme
  773.  
  774. CONST FM_DeleteColor                            = FM_RemColor,
  775.       FM_DeleteColorScheme                      = FM_RemPalette
  776.  
  777. OBJECT fs_AddColor                              ; argb:LONG ; ENDOBJECT
  778. OBJECT fs_RemColor                              ; color:PTR TO feelinColor ; ENDOBJECT
  779. OBJECT fs_RemPalette                            ; palette:PTR TO feelinPalette ; ENDOBJECT
  780. OBJECT fs_CreateColor                           ; spec:PTR TO CHAR; reference:PTR TO feelinPalette ; ENDOBJECT
  781. #define FS_DeleteColor                          fs_RemColor
  782. OBJECT fs_CreateColorScheme                     ; spec:PTR TO CHAR; reference:PTR TO feelinPalette ; ENDOBJECT
  783. #define FS_DeleteColorScheme                    fs_RemPalette
  784.  
  785. ENUM  FA_ColorScheme                            = FR_Display_ATTR
  786.  
  787. ENUM  FV_Pen_Text,
  788.       FV_Pen_Shine,
  789.       FV_Pen_HalfShine,
  790.       FV_Pen_Fill,
  791.       FV_Pen_HalfShadow,
  792.       FV_Pen_Shadow,
  793.       FV_Pen_HalfDark,
  794.       FV_Pen_Dark,
  795.       FV_Pen_Highlight,
  796.       FV_PEN_COUNT
  797.  
  798. CONST FV_COLOR_SPACE                            = 12
  799.  
  800. /*** FeelinColor ***********************************************************/
  801.  
  802. OBJECT feelinColor
  803.    _priv0:LONG
  804.    _priv1:LONG
  805.    pen:LONG
  806.    argb:LONG
  807. ENDOBJECT
  808.  
  809. /*** FeelinPalette *********************************************************/
  810.  
  811. OBJECT feelinPalette
  812.    _priv0:LONG
  813.    _priv1:LONG
  814.    _priv2:LONG
  815.    colorcount:LONG
  816.    pens:PTR TO LONG
  817.    argb:PTR TO LONG
  818.    colors:PTR TO LONG
  819. ENDOBJECT
  820.  
  821. #define FC_Display                               "Display"
  822. ->ENDPROC
  823. /*** GUI Classes ***********************************************************/
  824.  
  825. ->PROC Area                               $001000
  826. #define FC_Area               'Area'
  827. CONST FR_Area        = $001000
  828. CONST FR_Area_MTHD   = MTHD_BASE OR FR_Area,
  829.       FR_Area_ATTR   = ATTR_BASE OR FR_Area
  830.  
  831. ENUM  FM_Setup                      = FR_Area_MTHD,
  832.       FM_Cleanup,
  833.       FM_Show,
  834.       FM_Hide,
  835.       FM_AskMinMax,
  836.       FM_Layout,
  837.       FM_Draw,
  838.       FM_Erase,
  839.       FM_HandleEvent,
  840.       FM_ModifyHandler,
  841.       FM_GoActive,
  842.       FM_GoInactive,
  843.       FM_GoDisabled,
  844.       FM_GoEnabled,
  845.       FM_DnDDo,
  846.       FM_DnDQuery,
  847.       FM_DnDBegin,
  848.       FM_DnDFinish,
  849.       FM_DnDReport,
  850.       FM_DnDDrop,
  851.       FM_RethinkLayout,
  852.       FM_BuildContextMenu,
  853.       FM_BuildContextHelp
  854.  
  855. #define FS_Draw               feelins_Draw
  856. #define FS_Erase              feelins_Erase
  857. #define FS_Setup              feelins_Setup
  858. #define FS_HandleEvent        feelins_HandleEvent
  859. #define FS_DragQuery          feelins_DragQuery
  860. #define FS_BuildContextHelp   feelins_BuildContextHelp
  861. #define FS_BuildContextMenu   feelins_BuildContextMenu
  862.  
  863. ENUM  FA_AreaData              = FR_Area_ATTR,
  864.       FA_Left,
  865.       FA_Top,
  866.       FA_Right,
  867.       FA_Bottom,
  868.       FA_Width,
  869.       FA_Height,
  870.       FA_Inner_Left,
  871.       FA_Inner_Top,
  872.       FA_Inner_Right,
  873.       FA_Inner_Bottom,
  874.       FA_Inner_Width,
  875.       FA_Inner_Height,
  876.       FA_MinWidth,
  877.       FA_MinHeight,
  878.       FA_MaxWidth,
  879.       FA_MaxHeight,
  880.       FA_FixWidth,
  881.       FA_FixHeight,
  882.       OBS_FA_FixWidthTxt,
  883.       OBS_FA_FixHeightTxt,
  884.       OBS_FA_Fixed,
  885.       OBS_FA_FixedWidth,
  886.       OBS_FA_FixedHeight,
  887.       FA_SetMin,
  888.       FA_SetMax,
  889.       FA_Active,
  890.       FA_Selected,
  891.       FA_Pressed,
  892.       FA_Hidden,
  893.       FA_Disabled,
  894.       FA_Draggable,
  895.       FA_Dropable,
  896.       FA_Horizontal,
  897.       FA_Timer,
  898.       FA_Font,
  899.       FA_Weight,
  900.       FA_NoFill,
  901.       FA_InputMode,
  902.       FA_ControlChar,
  903.       FA_ChainToCycle,
  904.       FA_WindowObject
  905.  
  906. ENUM  FV_InputMode_None,
  907.       FV_InputMode_Immediate,
  908.       FV_InputMode_Release,
  909.       FV_InputMode_Toggle
  910.  
  911. ENUM  FV_SetMin = TRUE,
  912.       FV_NoSetMin,
  913.       FV_SetMinW,
  914.       FV_SetMinH
  915.  
  916. ENUM  FV_SetMax = TRUE,
  917.       FV_NoSetMax,
  918.       FV_SetMaxW,
  919.       FV_SetMaxH
  920.  
  921. ENUM  FV_Font_Inherit = -1
  922.  
  923. CONST FF_Horizontal           = %00000000000000000000000000000001,
  924.       FF_Area_SetMinW         = %00000000000000000000000000000010,
  925.       FF_Area_SetMaxW         = %00000000000000000000000000000100,
  926.       FF_Area_SetMinH         = %00000000000000000000000000001000,
  927.       FF_Area_SetMaxH         = %00000000000000000000000000010000,
  928.       FF_Area_Selected        = %00000000000000000000000000100000,
  929.       FF_Area_Pressed         = %00000000000000000000000001000000,
  930.       FF_Area_Active          = %00000000000000000000000010000000,
  931.       FF_Area_Disabled        = %00000000000000000000000100000000,
  932.  
  933.       FF_Area_Group           = %00000000000000000001000000000000,
  934.       FF_Area_CanDraw         = 1 << 13,
  935.       FF_Area_Show            = 1 << 14,
  936.       FF_Area_Setup           = 1 << 15
  937.  
  938. CONST FF_Draw_Object         = %00000000000000000000000000000001,
  939.       FF_Draw_Update         = %00000000000000000000000000000010,
  940.       FF_Draw_Custom_1       = %00000001000000000000000000000000,
  941.       FF_Draw_Custom_2       = %00000010000000000000000000000000,
  942.       FF_Draw_Custom_3       = %00000100000000000000000000000000,
  943.       FF_Draw_Custom_4       = %00001000000000000000000000000000,
  944.       FF_Draw_Custom_5       = %00010000000000000000000000000000,
  945.       FF_Draw_Custom_6       = %00100000000000000000000000000000,
  946.       FF_Draw_Custom_7       = %01000000000000000000000000000000,
  947.       FF_Draw_Custom_8       = %10000000000000000000000000000000
  948.  
  949. CONST FF_Erase_Fill          = %00000000000000000000000000000001,
  950.       FF_Erase_Region        = %00000000000000000000000000000010
  951.  
  952. CONST FV_MAXMAX = 10000
  953.  
  954. OBJECT feelinRect   ; x1:INT, y1:INT, x2:INT, y2:INT         ; ENDOBJECT
  955. OBJECT feelinBox    ; x:INT,y:INT,w:INT,h:INT                ; ENDOBJECT
  956. OBJECT feelinMinMax ; minw:INT, minh:INT, maxw:INT, maxh:INT ; ENDOBJECT
  957.  
  958. #define FAreaData                               feelinAreaData
  959.  
  960. OBJECT feelinAreaData
  961.    parent:FObject
  962.    next:FObject
  963.    prev:FObject
  964.  
  965.    render:PTR TO feelinRender
  966.  
  967.    flags:LONG
  968.  
  969.    box:feelinBox
  970.    inner:feelinInner
  971.    minmax:feelinMinMax
  972.  
  973.    pens:PTR TO LONG
  974.    font:PTR TO textfont
  975.    weight:INT
  976. ENDOBJECT
  977.  
  978. OBJECT feelins_Setup                            ; render:PTR TO feelinRender ; ENDOBJECT
  979. OBJECT feelins_Draw                             ; flags ; ENDOBJECT
  980. OBJECT feelins_Erase                            ; rect:PTR TO feelinRect ; flags ; ENDOBJECT
  981. OBJECT feelins_HandleEvent                      ; fev:PTR TO feelinEvent ; ENDOBJECT
  982. OBJECT feelins_ModifyHandler                    ; add,sub ; ENDOBJECT
  983. OBJECT feelins_DnDDo                            ; mousex,mousey ; ENDOBJECT
  984. OBJECT feelins_DnDQuery                         ; mousex,mousey ; source:FObject ; ENDOBJECT
  985. OBJECT feelins_DnDBegin                         ; source:FObject ; ENDOBJECT
  986. OBJECT feelins_DnDFinish                        ; source:FObject ; ENDOBJECT
  987. OBJECT feelins_DnDReport                        ; mousex,mousey ; source:FObject ; update ; dragbox:PTR TO feelinBox ; ENDOBJECT
  988. OBJECT feelins_DnDDrop                          ; mousex,mousey ; source:FObject ; ENDOBJECT
  989. OBJECT feelins_BuildContextHelp                 ; mousex,mousey,help:PTR TO CHAR ; ENDOBJECT
  990. OBJECT FS_BuildContextMenu                      ; mousex,mousey,menu:FObject,contextowner:FObject,render:PTR TO feelinRender ; ENDOBJECT
  991.  
  992. /* the following macros assume  the  variable  'lod'  to  be  declared  and
  993. holding  a  field  'areadata'  of type (FAreaData *). If it is not the case
  994. undef '_areadata' and redefine it to your convenience */
  995.  
  996. #define _areadata                               (lod.areadata::FAreaData)
  997. #define _parent                                 (_areadata.parent)
  998. #define _render                                 (_areadata.render)
  999. #define _flags                                  (_areadata.flags)
  1000. #define _box                                    (_areadata.box)
  1001. #define _x                                      (_box.x)
  1002. #define _y                                      (_box.y)
  1003. #define _w                                      (_box.w)
  1004. #define _h                                      (_box.h)
  1005. #define _inner                                  (_areadata.inner)
  1006. #define _bl                                     (_inner.l)
  1007. #define _bt                                     (_inner.t)
  1008. #define _br                                     (_inner.r)
  1009. #define _bb                                     (_inner.b)
  1010. #define _minmax                                 (_areadata.minmax)
  1011. #define _minw                                   (_minmax.minw)
  1012. #define _minh                                   (_minmax.minh)
  1013. #define _maxw                                   (_minmax.maxw)
  1014. #define _maxh                                   (_minmax.maxh)
  1015. #define _pens                                   (_areadata.pens)
  1016. #define _font                                   (_areadata.font)
  1017. #define _weight                                 (_areadata.weight)
  1018.  
  1019. /* extanded coordinates macros */
  1020.  
  1021. #define _x2                                     (_x + _w - 1)
  1022. #define _y2                                     (_y + _h - 1)
  1023. #define _mx                                     (_x + _bl)
  1024. #define _my                                     (_y + _bt)
  1025. #define _mw                                     (_w - _bl - _br)
  1026. #define _mh                                     (_h - _bt - _bb)
  1027. #define _mx2                                    (_x2 - _br)
  1028. #define _my2                                    (_y2 - _bb)
  1029.  
  1030. /* macros to access  "_areadata.render".  !!WARNING!!  "_render"  *MUST*  be
  1031. checked before accessing flieds */
  1032.  
  1033. #define _display                                _render.display
  1034. #define _app                                    _render.application
  1035. #define _win                                    _render.window
  1036. #define _rp                                     _render.rport
  1037.  
  1038. /* macros that can be used while creating objects */
  1039.  
  1040. #define AreaObject            F_NewObjA(FC_Area,[TAG_IGNORE,NIL
  1041. #define InputImmediate        FA_InputMode,FV_InputMode_Immediate
  1042. #define InputRelease          FA_InputMode,FV_InputMode_Release
  1043. #define InputToggle           FA_InputMode,FV_InputMode_Toggle
  1044. #define DontChain             FA_ChainToCycle,FALSE
  1045. #define HorizLayout           FA_Horizontal,TRUE
  1046. ->ENDPROC
  1047. ->PROC Group                              $001040
  1048. #define FC_Group     'Group'
  1049. #define GroupObject  F_NewObjA(FC_Group,[TAG_IGNORE,NIL
  1050. #define VGroup       F_NewObjA(FC_Group,[FA_ChainToCycle,FALSE
  1051. #define HGroup       F_NewObjA(FC_Group,[FA_ChainToCycle,FALSE,FA_Horizontal,TRUE
  1052. #define Page         F_NewObjA(FC_Group,[FA_ChainToCycle,TRUE,FA_Group_PageMode,TRUE
  1053.  
  1054. CONST FR_Group      = $001040
  1055. CONST FR_Group_MTHD = MTHD_BASE OR FR_Group,
  1056.       FR_Group_ATTR = ATTR_BASE OR FR_Group
  1057.  
  1058. ENUM  FM_Group_Forward                          = FR_Group_MTHD,
  1059.       FM_Group_InitChange,
  1060.       FM_Group_ExitChange
  1061.  
  1062. ENUM  FA_Group_HSpacing    = FR_Group_ATTR,
  1063.       FA_Group_VSpacing,
  1064.       FA_Group_SameWidth,
  1065.       FA_Group_SameHeight,
  1066.       FA_Group_SameSize,
  1067.       FA_Group_RelSizing,
  1068.       FA_Group_Title,
  1069.       FA_Group_Forward,
  1070.       FA_Group_PageMode,
  1071.       FA_Group_PageFont,
  1072.       FA_Group_PageStyle,
  1073.       FA_Group_ActivePage,
  1074.       FA_Group_Rows,
  1075.       FA_Group_Columns,
  1076.       FA_Group_LayoutHook,
  1077.       FA_Group_MinMaxHook
  1078.  
  1079. ENUM  FV_Group_ActivePage_Prev = -4,
  1080.       FV_Group_ActivePage_Next,
  1081.       FV_Group_ActivePage_Last,
  1082.       FV_Group_ActivePage_First
  1083. ->ENDPROC
  1084. ->PROC Text                               $001080
  1085. #define FC_Text 'Text'
  1086.  
  1087. CONST FR_Text                                   = $001080
  1088. CONST FR_Text_MTHD                              = MTHD_BASE OR FR_Text,
  1089.       FR_Text_ATTR                              = ATTR_BASE OR FR_Text
  1090.  
  1091. ENUM  FA_Text                                   = FR_Text_ATTR,
  1092.       FA_Text_PreParse,
  1093.       FA_Text_AltPreParse,
  1094.       FA_Text_Shortcut,
  1095.       FA_Text_HCenter,
  1096.       FA_Text_VCenter,
  1097.       FA_Text_Static
  1098.  
  1099. #define TextObject                  F_NewObjA(FC_Text,[TAG_IGNORE,NIL
  1100. #define TextBack                    FA_Back,'FP_Text_Back'
  1101. ->ENDPROC
  1102.  
  1103. /***************************************************************************/
  1104. /*** Dynamic Classes *******************************************************/
  1105. /***************************************************************************/
  1106.  
  1107. #define FC_Balance                  'Balance'
  1108. #define FC_Bar                      'Bar'
  1109. #define FC_Cycle                    'Cycle'
  1110. #define FC_Dataspace                'Dataspace'
  1111. #define FC_Gauge                    'Gauge'
  1112. #define FC_Image                    'Image'
  1113. #define FC_Numeric                  'Numeric'
  1114. #define FC_Picture                  'Picture'
  1115. #define FC_PopHelp                  'PopHelp'
  1116. #define FC_PopColor                 'PopColor'
  1117. #define FC_Prop                     'Prop'
  1118. #define FC_Radio                    'Radio'
  1119. #define FC_Scale                    'Scale'
  1120. #define FC_Slider                   'Slider'
  1121. #define FC_String                   'String'
  1122.  
  1123. #define BalanceID(id)               F_NewObjA(FC_Balance,[FA_ID,id,TAG_DONE])
  1124. #define BalanceObject               F_NewObjA(FC_Balance,[TAG_IGNORE,NIL
  1125. #define BarObject                   F_NewObjA(FC_Bar,[TAG_IGNORE,NIL
  1126. #define CycleObject                 F_NewObjA(FC_Cycle,[TAG_IGNORE,NIL
  1127. #define DataspaceObject             F_NewObjA(FC_Dataspace,[TAG_IGNORE,NIL
  1128. #define GaugeObject                 F_NewObjA(FC_Gauge,[TAG_IGNORE,NIL
  1129. #define ImageObject                 F_NewObjA(FC_Image,[TAG_IGNORE,NIL
  1130. #define NumericObject               F_NewObjA(FC_Numeric,[TAG_IGNORE,NIL
  1131. #define PictureObject               F_NewObjA(FC_Picture,[TAG_IGNORE,NIL
  1132. #define PopColorObject              F_NewObjA(FC_PopColor,[TAG_IGNORE,NIL
  1133. #define PopHelpObject               F_NewObjA(FC_PopHelp,[TAG_IGNORE,NIL
  1134. #define PropObject                  F_NewObjA(FC_Prop,[TAG_IGNORE,NIL
  1135. #define RadioObject                 F_NewObjA(FC_Radio,[TAG_IGNORE,NIL
  1136. #define ScaleObject                 F_NewObjA(FC_Scale,[TAG_IGNORE,NIL
  1137. #define SliderObject                F_NewObjA(FC_Slider,[TAG_IGNORE,NIL
  1138. #define StringObject                F_NewObjA(FC_String,[TAG_IGNORE,NIL
  1139.  
  1140. /*** Values ****************************************************************/
  1141.  
  1142. ENUM  FV_Image_Normal,
  1143.       FV_Image_Selected,
  1144.       FV_Image_Enabled,
  1145.       FV_Image_Disabled
  1146.  
  1147. ENUM  FV_String_Left,
  1148.       FV_String_Center,
  1149.       FV_String_Right
  1150.  
  1151. /*** Macros ****************************************************************/
  1152.  
  1153. #define ButtonBack      FA_Back, 'FP_Button_Back'
  1154.